package com.yycwxt.modules.admin.subcompare;

import com.yycwxt.domain.SubCompare;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class SubCompareService {

    private SubCompareMapper mapper;

    @Autowired
    public SubCompareService(SubCompareMapper mapper) {
        this.mapper = mapper;
    }

    public List<Map<String, Object>> subcompare(SubCompare sub) {
        Map<String, Object> map = new HashMap<>();
        map.put("subject", sub.getSubject());
//        map.put("len", sub.getLen());
        return mapper.subcompare(map);
    }

    public List<String> getshops(){
        return mapper.getshops();
    }
}
